
import './index.css';
import React from 'react';
import { createRoot } from 'react-dom/client';

import zhCN from 'antd/es/locale/zh_CN';
import { ConfigProvider, message } from 'antd';
import _ from 'lodash';
import { sendRequest } from './pages/util';
import { Index } from './pages/Index';

const App = () => {
  return (
    <ConfigProvider locale={zhCN}>
      <Index />
    </ConfigProvider>
  );
}

export const LocalDebug = { localDebug: false };

async function init() {
  var ret = (await sendRequest("localDebug", {}));
  console.log("localDebug", ret);
  LocalDebug.localDebug = ret.localDebug;

  const container = document.getElementById('root');
  const root = createRoot(container);
  root.render(<App />);
};
init();
(window as any).lodash = _;